<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>文章列表页</title>
<link href="./css/style.css" rel="stylesheet" type="text/css" />
<link href="./css/boxy.css" rel="stylesheet" type="text/css" />
<{insert_scripts files="./js/jquery.min.js,admin.js,jquery.boxy.js"}>
</head>
<body>
<form name="Form1" method="post" action="manage.aspx?tablename=news" id="Form1">
  <div class="list_border">
    <div class="tools"> 
      <!--      <div id="caozuo" style="margin:0 0 0 2px;">
        <p>操作</p>
        <input type="button" name="Button2" value="添加信息" onclick="javascript:__doPostBack('Button2','')" id="Button2" class="button_add" />
        <input type="button" name="Bt_del" value="删除信息" onclick="javascript:__doPostBack('Bt_del','')" id="Bt_del" class="button_del" />
      </div>-->
      <div>
        <p> 搜索</p>
        <select name="DD_SearchType" id="DD_SearchType" class="dd" style="width:80px;">
          <option value="title">标题</option>
          <option value="content">内容</option>
          <option value="AdminName">发布者</option>
        </select>
        <input name="TB_key" type="text" id="TB_key" class="textbox" />
        <input type="button" name="Button5" value="搜索" onclick="javascript:__doPostBack('Button5','')" id="Button5" class="button_search" />
      </div>
    </div>
    <div class=list>
      <ul style="background-image: url(../images/t_bg.jpg)">
        <li class="check">
          <input type=checkbox name=all onclick="select_all(this.checked);"  />
        </li>
        <li class="left" ><b>序号</b></li>
        <li class="title"><b>产品名称</b></li>
        <li style="width:150px"><b>可用操作</b></li>
        <li style="width:60px"><b>显示顺序</b></li>
        <li style="width:120px"><b>更新时间</b></li>
        <li style="width:50px"><b>最后编辑</b></li>
        <li style="width:80px"><b>前台显示</b></li>
        <li style="width:120px"><b>所属分类</b></li>
        <li style="width:60px"><b>产品图片</b></li>
        <li class="none"></li>
      </ul>
      
 <{foreach from=$res item=datil key=id}>
      <ul id=l15 class="pane">
        <li class="check">
          <input type=checkbox name="c<{$datil.id}>" />
        </li>
        <li class="left" ><{$datil.id}></li>
        <li class="title"><{$datil.product_name}></li>
        <li style="width:150px">
        <a class="dataEdit" title="修改记录"   href="./index.php?c=admin&a=products&mod=edit&act=editframe&id=<{$datil.id}>"><img src="/images/admin/icon_edit.gif"/></a> 
        
        <{if $datil.product_status==0}><a href="./index.php?c=admin&a=products&mod=edit&display=true&id=<{$datil.id}>" class="btn-approve" title="显示在前台"><img src="/images/admin/picflag.gif"/></a><{else}> <a href="./index.php?c=admin&a=products&mod=edit&display=false&id=<{$datil.id}>" class="btn-unapprove" title="前台不显示" ><img src="/images/admin/picnoflag.gif"/></a> <{/if}>
        
       <a class="dataDel" href="./index.php?c=admin&a=products&mod=edit&&act=del&id=<{$datil.id}>"  class="btn-spam" title="删除"><img src="/images/admin/icon_trash.gif"/></a>
       
        </li>
        <li style="width:60px"><{$datil.show_order}></li>
        <li style="width:120px"><{$datil.product_add_time|date_format:"%Y-%m-%d"}></li>
        <li style="width:50px"><{$datil.product_add_author}></li>
        <li style="width:80px"><{if $datil.product_status==0}><img src="/images/admin/data_invalid.gif"/><{else}><img src="/images/admin/yes.gif"/><{/if}></li>
        <li style="width:120px"><{$datil.fid}></li>
        <li style="width:60px"><div><a class="img_preview" href="javascript:void()" rel="<{$datil.product_thumb}>"><img src="/images/admin/<{if $datil.product_thumb}>slide.png<{else}>warning_small.gif<{/if}>" align="absmiddle"></a></div></li>
        <li class="none"></li>
      </ul>
      <{/foreach}> </div>      
     <!-----分页开始------>
    <{if $pager}>
    <div class="sabrosus"> 共计<{$pager.total_count}>条记录，分<{$pager.total_page}>页（每页<{$pager.page_size}>条记录）： 
      <!--在当前页不是第一页的时候，显示前页和上一页--> 
      <{if $pager.current_page != $pager.first_page}> <a href="<{spUrl c=admin a=products mod=$mod page=$pager.first_page}>">&lt;</a> <a href="<{spUrl c=admin a=products mod=$mod page=$pager.prev_page}>">上一页</a> <{/if}> 
      <!--开始循环页码，同时如果循环到当前页则不显示链接--> 
      <{foreach from=$pager.all_pages item=thepage}>
      <{if $thepage != $pager.current_page}> <a href="<{spUrl c=admin a=products mod=$mod page=$thepage}>"><{$thepage}></a> <{else}> <span class="current"><{$thepage}></span> <{/if}>
      <{/foreach}> 
      <!--在当前页不是最后一页的时候，显示下一页和后页--> 
      <{if $pager.current_page != $pager.last_page}> <a href="<{spUrl c=admin a=products mod=$mod page=$pager.next_page}>">下一页</a> <a href="<{spUrl c=admin a=products mod=$mod page=$pager.last_page}>">&gt;</a> <{/if}> </div>
    <{/if}> </div>
</form>
<script type="text/javascript">
$(".edit_frame").load(function(){
	alert($(".edit_frame").attr("src"));
	});

$(function() {
	$(".dataEdit").boxy();
	$(".dataDel").click(function() {tempUrl=$(this).attr("href"); Boxy.confirm("确定删除此产品？", function() {window.location.href=tempUrl}, {title: "提示信息"}); return false; });
	$(".img_preview").bind("mouseover",function(){
		//alert($(this).attr("rel"));
		//alert($(this).parent().html())
	if($(this).attr("rel")!=""){	
		$(this).parent().append("<div class='img_pre_div' style='width:auto; over-flow:hidden; height:auto; position: absolute;  border:1px solid red'><img style=\"max-width:400px;\"  src=\""+$(this).attr("rel")+"\"\></div>");
	}else{
		$(this).parent().append("<div class='img_pre_div' style='width:322px; height:200px; position: absolute; background:#FFF; border:1px solid red'>您尚未上传此产品图片,请点击编辑后上传</div>");
		}
		$(this).live('mouseout', function() {
			//alert($(this).parent().html());
   		$(this).next().remove(); 
		});
	});
});
//------------------------------
        var editor;
		var options = {
        cssPath : '/include/kindeditor/examples/index.css',
        filterMode : true,
		allowFileManager : true,
		};
        KindEditor.ready(function(K) {
                editor = K.create('#editor_id', {
                        themeType : 'common',
						uploadJson : './index.php?c=upload&a=upload_json',
						fileManagerJson : './index.php?c=upload&a=file_manager_json',
						allowFileManager : true
                });
        });				
</script>
</body>
</html>
